{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport * as React from 'react';\nimport { updateCSS, removeCSS } from \"rc-util/es/Dom/dynamicCSS\";\nimport canUseDom from \"rc-util/es/Dom/canUseDom\";\nimport hash from '@emotion/hash'; // @ts-ignore\n\nimport unitless from '@emotion/unitless';\nimport { compile, serialize, stringify } from 'stylis';\nimport useGlobalCache from \"./useGlobalCache\";\nimport StyleContext, { ATTR_MARK, ATTR_TOKEN, ATTR_DEV_CACHE_PATH, CSS_IN_JS_INSTANCE, CSS_IN_JS_INSTANCE_ID } from \"../StyleContext\";\nimport { styleValidate, supportLayer } from \"../util\";\nvar isClientSide = canUseDom();\nvar SKIP_CHECK = '_skip_check_';\n// ============================================================================\n// ==                                 Parser                                 ==\n// ============================================================================\n// Preprocessor style content to browser support one\nexport function normalizeStyle(styleStr) {\n  var serialized = serialize(compile(styleStr), stringify);\n  return serialized.replace(/\\{%%%\\:[^;];}/g, ';');\n}\nfunction isCompoundCSSProperty(value) {\n  return _typeof(value) === 'object' && value && SKIP_CHECK in value;\n}\nexport var animationStatistics = {}; // 注入 hash 值\n\nfunction injectSelectorHash(key, hashId, hashPriority) {\n  if (!hashId) {\n    return key;\n  }\n  var hashClassName = \".\".concat(hashId);\n  var hashSelector = hashPriority === 'low' ? \":where(\".concat(hashClassName, \")\") : hashClassName; // 注入 hashId\n\n  var keys = key.split(',').map(function (k) {\n    var _firstPath$match;\n    var fullPath = k.trim().split(/\\s+/); // 如果 Selector 第一个是 HTML Element，那我们就插到它的后面。反之，就插到最前面。\n\n    var firstPath = fullPath[0] || '';\n    var htmlElement = ((_firstPath$match = firstPath.match(/^\\w+/)) === null || _firstPath$match === void 0 ? void 0 : _firstPath$match[0]) || '';\n    firstPath = \"\".concat(htmlElement).concat(hashSelector).concat(firstPath.slice(htmlElement.length));\n    return [firstPath].concat(_toConsumableArray(fullPath.slice(1))).join(' ');\n  });\n  return keys.join(',');\n}\n\n// Global effect style will mount once and not removed\n// The effect will not save in SSR cache (e.g. keyframes)\nvar globalEffectStyleKeys = new Set();\n/**\n * @private Test only. Clear the global effect style keys.\n */\n\nexport var _cf = process.env.NODE_ENV !== 'production' ? function () {\n  return globalEffectStyleKeys.clear();\n} : undefined; // Parse CSSObject to style content\n\nexport var parseStyle = function parseStyle(interpolation) {\n  var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n      root: true\n    },\n    root = _ref.root,\n    injectHash = _ref.injectHash;\n  var hashId = config.hashId,\n    layer = config.layer,\n    path = config.path,\n    hashPriority = config.hashPriority,\n    _config$transformers = config.transformers,\n    transformers = _config$transformers === void 0 ? [] : _config$transformers;\n  var styleStr = '';\n  var effectStyle = {};\n  function parseKeyframes(keyframes) {\n    var animationName = keyframes.getName(hashId);\n    if (!effectStyle[animationName]) {\n      var _parseStyle = parseStyle(keyframes.style, config, {\n          root: false\n        }),\n        _parseStyle2 = _slicedToArray(_parseStyle, 1),\n        _parsedStr = _parseStyle2[0];\n      effectStyle[animationName] = \"@keyframes \".concat(keyframes.getName(hashId)).concat(_parsedStr);\n    }\n  }\n  function flattenList(list) {\n    var fullList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n    list.forEach(function (item) {\n      if (Array.isArray(item)) {\n        flattenList(item, fullList);\n      } else if (item) {\n        fullList.push(item);\n      }\n    });\n    return fullList;\n  }\n  var flattenStyleList = flattenList(Array.isArray(interpolation) ? interpolation : [interpolation]);\n  flattenStyleList.forEach(function (originStyle) {\n    // Only root level can use raw string\n    var style = typeof originStyle === 'string' && !root ? {} : originStyle;\n    if (typeof style === 'string') {\n      styleStr += \"\".concat(style, \"\\n\");\n    } else if (style._keyframe) {\n      // Keyframe\n      parseKeyframes(style);\n    } else {\n      var mergedStyle = transformers.reduce(function (prev, trans) {\n        var _trans$visit;\n        return (trans === null || trans === void 0 ? void 0 : (_trans$visit = trans.visit) === null || _trans$visit === void 0 ? void 0 : _trans$visit.call(trans, prev)) || prev;\n      }, style); // Normal CSSObject\n\n      Object.keys(mergedStyle).forEach(function (key) {\n        var value = mergedStyle[key];\n        if (_typeof(value) === 'object' && value && (key !== 'animationName' || !value._keyframe) && !isCompoundCSSProperty(value)) {\n          var subInjectHash = false; // 当成嵌套对象来处理\n\n          var mergedKey = key.trim(); // Whether treat child as root. In most case it is false.\n\n          var nextRoot = false; // 拆分多个选择器\n\n          if ((root || injectHash) && hashId) {\n            if (mergedKey.startsWith('@')) {\n              // 略过媒体查询，交给子节点继续插入 hashId\n              subInjectHash = true;\n            } else {\n              // 注入 hashId\n              mergedKey = injectSelectorHash(key, hashId, hashPriority);\n            }\n          } else if (root && !hashId && (mergedKey === '&' || mergedKey === '')) {\n            // In case of `{ '&': { a: { color: 'red' } } }` or `{ '': { a: { color: 'red' } } }` without hashId,\n            // we will get `&{a:{color:red;}}` or `{a:{color:red;}}` string for stylis to compile.\n            // But it does not conform to stylis syntax,\n            // and finally we will get `{color:red;}` as css, which is wrong.\n            // So we need to remove key in root, and treat child `{ a: { color: 'red' } }` as root.\n            mergedKey = '';\n            nextRoot = true;\n          }\n          var _parseStyle3 = parseStyle(value, _objectSpread(_objectSpread({}, config), {}, {\n              path: \"\".concat(path, \" -> \").concat(mergedKey)\n            }), {\n              root: nextRoot,\n              injectHash: subInjectHash\n            }),\n            _parseStyle4 = _slicedToArray(_parseStyle3, 2),\n            _parsedStr2 = _parseStyle4[0],\n            childEffectStyle = _parseStyle4[1];\n          effectStyle = _objectSpread(_objectSpread({}, effectStyle), childEffectStyle);\n          styleStr += \"\".concat(mergedKey).concat(_parsedStr2);\n        } else {\n          var _value;\n          var actualValue = (_value = value === null || value === void 0 ? void 0 : value.value) !== null && _value !== void 0 ? _value : value;\n          if (process.env.NODE_ENV !== 'production' && (_typeof(value) !== 'object' || !(value !== null && value !== void 0 && value[SKIP_CHECK]))) {\n            styleValidate(key, actualValue, {\n              path: path,\n              hashId: hashId\n            });\n          } // 如果是样式则直接插入\n\n          var styleName = key.replace(/[A-Z]/g, function (match) {\n            return \"-\".concat(match.toLowerCase());\n          }); // Auto suffix with px\n\n          var formatValue = actualValue;\n          if (!unitless[key] && typeof formatValue === 'number' && formatValue !== 0) {\n            formatValue = \"\".concat(formatValue, \"px\");\n          } // handle animationName & Keyframe value\n\n          if (key === 'animationName' && value !== null && value !== void 0 && value._keyframe) {\n            parseKeyframes(value);\n            formatValue = value.getName(hashId);\n          }\n          styleStr += \"\".concat(styleName, \":\").concat(formatValue, \";\");\n        }\n      });\n    }\n  });\n  if (!root) {\n    styleStr = \"{\".concat(styleStr, \"}\");\n  } else if (layer && supportLayer()) {\n    var layerCells = layer.split(',');\n    var layerName = layerCells[layerCells.length - 1].trim();\n    styleStr = \"@layer \".concat(layerName, \" {\").concat(styleStr, \"}\"); // Order of layer if needed\n\n    if (layerCells.length > 1) {\n      // zombieJ: stylis do not support layer order, so we need to handle it manually.\n      styleStr = \"@layer \".concat(layer, \"{%%%:%}\").concat(styleStr);\n    }\n  }\n  return [styleStr, effectStyle];\n}; // ============================================================================\n// ==                                Register                                ==\n// ============================================================================\n\nfunction uniqueHash(path, styleStr) {\n  return hash(\"\".concat(path.join('%')).concat(styleStr));\n}\nfunction Empty() {\n  return null;\n}\n/**\n * Register a style to the global style sheet.\n */\n\nexport default function useStyleRegister(info, styleFn) {\n  var token = info.token,\n    path = info.path,\n    hashId = info.hashId,\n    layer = info.layer;\n  var _React$useContext = React.useContext(StyleContext),\n    autoClear = _React$useContext.autoClear,\n    mock = _React$useContext.mock,\n    defaultCache = _React$useContext.defaultCache,\n    hashPriority = _React$useContext.hashPriority,\n    container = _React$useContext.container,\n    ssrInline = _React$useContext.ssrInline,\n    transformers = _React$useContext.transformers;\n  var tokenKey = token._tokenKey;\n  var fullPath = [tokenKey].concat(_toConsumableArray(path)); // Check if need insert style\n\n  var isMergedClientSide = isClientSide;\n  if (process.env.NODE_ENV !== 'production' && mock !== undefined) {\n    isMergedClientSide = mock === 'client';\n  }\n  var _useGlobalCache = useGlobalCache('style', fullPath,\n    // Create cache if needed\n    function () {\n      var styleObj = styleFn();\n      var _parseStyle5 = parseStyle(styleObj, {\n          hashId: hashId,\n          hashPriority: hashPriority,\n          layer: layer,\n          path: path.join('-'),\n          transformers: transformers\n        }),\n        _parseStyle6 = _slicedToArray(_parseStyle5, 2),\n        parsedStyle = _parseStyle6[0],\n        effectStyle = _parseStyle6[1];\n      var styleStr = normalizeStyle(parsedStyle);\n      var styleId = uniqueHash(fullPath, styleStr); // Clear animation statistics\n\n      animationStatistics = {};\n      if (isMergedClientSide) {\n        var style = updateCSS(styleStr, styleId, {\n          mark: ATTR_MARK,\n          prepend: 'queue',\n          attachTo: container\n        });\n        style[CSS_IN_JS_INSTANCE] = CSS_IN_JS_INSTANCE_ID; // Used for `useCacheToken` to remove on batch when token removed\n\n        style.setAttribute(ATTR_TOKEN, tokenKey); // Dev usage to find which cache path made this easily\n\n        if (process.env.NODE_ENV !== 'production') {\n          style.setAttribute(ATTR_DEV_CACHE_PATH, fullPath.join('|'));\n        } // Inject client side effect style\n\n        Object.keys(effectStyle).forEach(function (effectKey) {\n          if (!globalEffectStyleKeys.has(effectKey)) {\n            globalEffectStyleKeys.add(effectKey); // Inject\n\n            updateCSS(normalizeStyle(effectStyle[effectKey]), \"_effect-\".concat(effectKey), {\n              mark: ATTR_MARK,\n              prepend: 'queue',\n              attachTo: container\n            });\n          }\n        });\n      }\n      return [styleStr, tokenKey, styleId];\n    },\n    // Remove cache if no need\n    function (_ref2, fromHMR) {\n      var _ref3 = _slicedToArray(_ref2, 3),\n        styleId = _ref3[2];\n      if ((fromHMR || autoClear) && isClientSide) {\n        removeCSS(styleId, {\n          mark: ATTR_MARK\n        });\n      }\n    }),\n    _useGlobalCache2 = _slicedToArray(_useGlobalCache, 3),\n    cachedStyleStr = _useGlobalCache2[0],\n    cachedTokenKey = _useGlobalCache2[1],\n    cachedStyleId = _useGlobalCache2[2];\n  return function (node) {\n    var styleNode;\n    if (!ssrInline || isMergedClientSide || !defaultCache) {\n      styleNode = /*#__PURE__*/React.createElement(Empty, null);\n    } else {\n      var _ref4;\n      styleNode = /*#__PURE__*/React.createElement(\"style\", _extends({}, (_ref4 = {}, _defineProperty(_ref4, ATTR_TOKEN, cachedTokenKey), _defineProperty(_ref4, ATTR_MARK, cachedStyleId), _ref4), {\n        dangerouslySetInnerHTML: {\n          __html: cachedStyleStr\n        }\n      }));\n    }\n    return /*#__PURE__*/React.createElement(React.Fragment, null, styleNode, node);\n  };\n} // ============================================================================\n// ==                                  SSR                                   ==\n// ============================================================================\n\nexport function extractStyle(cache) {\n  // prefix with `style` is used for `useStyleRegister` to cache style context\n  var styleKeys = Array.from(cache.cache.keys()).filter(function (key) {\n    return key.startsWith('style%');\n  }); // const tokenStyles: Record<string, string[]> = {};\n\n  var styleText = '';\n  styleKeys.forEach(function (key) {\n    var _ = _slicedToArray(cache.cache.get(key)[1], 3),\n      styleStr = _[0],\n      tokenKey = _[1],\n      styleId = _[2];\n    styleText += \"<style \".concat(ATTR_TOKEN, \"=\\\"\").concat(tokenKey, \"\\\" \").concat(ATTR_MARK, \"=\\\"\").concat(styleId, \"\\\">\").concat(styleStr, \"</style>\");\n  });\n  return styleText;\n}","map":{"version":3,"names":["_extends","_defineProperty","_objectSpread","_slicedToArray","_toConsumableArray","_typeof","React","updateCSS","removeCSS","canUseDom","hash","unitless","compile","serialize","stringify","useGlobalCache","StyleContext","ATTR_MARK","ATTR_TOKEN","ATTR_DEV_CACHE_PATH","CSS_IN_JS_INSTANCE","CSS_IN_JS_INSTANCE_ID","styleValidate","supportLayer","isClientSide","SKIP_CHECK","normalizeStyle","styleStr","serialized","replace","isCompoundCSSProperty","value","animationStatistics","injectSelectorHash","key","hashId","hashPriority","hashClassName","concat","hashSelector","keys","split","map","k","_firstPath$match","fullPath","trim","firstPath","htmlElement","match","slice","length","join","globalEffectStyleKeys","Set","_cf","process","env","NODE_ENV","clear","undefined","parseStyle","interpolation","config","arguments","_ref","root","injectHash","layer","path","_config$transformers","transformers","effectStyle","parseKeyframes","keyframes","animationName","getName","_parseStyle","style","_parseStyle2","_parsedStr","flattenList","list","fullList","forEach","item","Array","isArray","push","flattenStyleList","originStyle","_keyframe","mergedStyle","reduce","prev","trans","_trans$visit","visit","call","Object","subInjectHash","mergedKey","nextRoot","startsWith","_parseStyle3","_parseStyle4","_parsedStr2","childEffectStyle","_value","actualValue","styleName","toLowerCase","formatValue","layerCells","layerName","uniqueHash","Empty","useStyleRegister","info","styleFn","token","_React$useContext","useContext","autoClear","mock","defaultCache","container","ssrInline","tokenKey","_tokenKey","isMergedClientSide","_useGlobalCache","styleObj","_parseStyle5","_parseStyle6","parsedStyle","styleId","mark","prepend","attachTo","setAttribute","effectKey","has","add","_ref2","fromHMR","_ref3","_useGlobalCache2","cachedStyleStr","cachedTokenKey","cachedStyleId","node","styleNode","createElement","_ref4","dangerouslySetInnerHTML","__html","Fragment","extractStyle","cache","styleKeys","from","filter","styleText","_","get"],"sources":["/data/messenger.client/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport * as React from 'react';\nimport { updateCSS, removeCSS } from \"rc-util/es/Dom/dynamicCSS\";\nimport canUseDom from \"rc-util/es/Dom/canUseDom\";\nimport hash from '@emotion/hash'; // @ts-ignore\n\nimport unitless from '@emotion/unitless';\nimport { compile, serialize, stringify } from 'stylis';\nimport useGlobalCache from \"./useGlobalCache\";\nimport StyleContext, { ATTR_MARK, ATTR_TOKEN, ATTR_DEV_CACHE_PATH, CSS_IN_JS_INSTANCE, CSS_IN_JS_INSTANCE_ID } from \"../StyleContext\";\nimport { styleValidate, supportLayer } from \"../util\";\nvar isClientSide = canUseDom();\nvar SKIP_CHECK = '_skip_check_';\n// ============================================================================\n// ==                                 Parser                                 ==\n// ============================================================================\n// Preprocessor style content to browser support one\nexport function normalizeStyle(styleStr) {\n  var serialized = serialize(compile(styleStr), stringify);\n  return serialized.replace(/\\{%%%\\:[^;];}/g, ';');\n}\n\nfunction isCompoundCSSProperty(value) {\n  return _typeof(value) === 'object' && value && SKIP_CHECK in value;\n}\n\nexport var animationStatistics = {}; // 注入 hash 值\n\nfunction injectSelectorHash(key, hashId, hashPriority) {\n  if (!hashId) {\n    return key;\n  }\n\n  var hashClassName = \".\".concat(hashId);\n  var hashSelector = hashPriority === 'low' ? \":where(\".concat(hashClassName, \")\") : hashClassName; // 注入 hashId\n\n  var keys = key.split(',').map(function (k) {\n    var _firstPath$match;\n\n    var fullPath = k.trim().split(/\\s+/); // 如果 Selector 第一个是 HTML Element，那我们就插到它的后面。反之，就插到最前面。\n\n    var firstPath = fullPath[0] || '';\n    var htmlElement = ((_firstPath$match = firstPath.match(/^\\w+/)) === null || _firstPath$match === void 0 ? void 0 : _firstPath$match[0]) || '';\n    firstPath = \"\".concat(htmlElement).concat(hashSelector).concat(firstPath.slice(htmlElement.length));\n    return [firstPath].concat(_toConsumableArray(fullPath.slice(1))).join(' ');\n  });\n  return keys.join(',');\n}\n\n// Global effect style will mount once and not removed\n// The effect will not save in SSR cache (e.g. keyframes)\nvar globalEffectStyleKeys = new Set();\n/**\n * @private Test only. Clear the global effect style keys.\n */\n\nexport var _cf = process.env.NODE_ENV !== 'production' ? function () {\n  return globalEffectStyleKeys.clear();\n} : undefined; // Parse CSSObject to style content\n\nexport var parseStyle = function parseStyle(interpolation) {\n  var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n    root: true\n  },\n      root = _ref.root,\n      injectHash = _ref.injectHash;\n\n  var hashId = config.hashId,\n      layer = config.layer,\n      path = config.path,\n      hashPriority = config.hashPriority,\n      _config$transformers = config.transformers,\n      transformers = _config$transformers === void 0 ? [] : _config$transformers;\n  var styleStr = '';\n  var effectStyle = {};\n\n  function parseKeyframes(keyframes) {\n    var animationName = keyframes.getName(hashId);\n\n    if (!effectStyle[animationName]) {\n      var _parseStyle = parseStyle(keyframes.style, config, {\n        root: false\n      }),\n          _parseStyle2 = _slicedToArray(_parseStyle, 1),\n          _parsedStr = _parseStyle2[0];\n\n      effectStyle[animationName] = \"@keyframes \".concat(keyframes.getName(hashId)).concat(_parsedStr);\n    }\n  }\n\n  function flattenList(list) {\n    var fullList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n    list.forEach(function (item) {\n      if (Array.isArray(item)) {\n        flattenList(item, fullList);\n      } else if (item) {\n        fullList.push(item);\n      }\n    });\n    return fullList;\n  }\n\n  var flattenStyleList = flattenList(Array.isArray(interpolation) ? interpolation : [interpolation]);\n  flattenStyleList.forEach(function (originStyle) {\n    // Only root level can use raw string\n    var style = typeof originStyle === 'string' && !root ? {} : originStyle;\n\n    if (typeof style === 'string') {\n      styleStr += \"\".concat(style, \"\\n\");\n    } else if (style._keyframe) {\n      // Keyframe\n      parseKeyframes(style);\n    } else {\n      var mergedStyle = transformers.reduce(function (prev, trans) {\n        var _trans$visit;\n\n        return (trans === null || trans === void 0 ? void 0 : (_trans$visit = trans.visit) === null || _trans$visit === void 0 ? void 0 : _trans$visit.call(trans, prev)) || prev;\n      }, style); // Normal CSSObject\n\n      Object.keys(mergedStyle).forEach(function (key) {\n        var value = mergedStyle[key];\n\n        if (_typeof(value) === 'object' && value && (key !== 'animationName' || !value._keyframe) && !isCompoundCSSProperty(value)) {\n          var subInjectHash = false; // 当成嵌套对象来处理\n\n          var mergedKey = key.trim(); // Whether treat child as root. In most case it is false.\n\n          var nextRoot = false; // 拆分多个选择器\n\n          if ((root || injectHash) && hashId) {\n            if (mergedKey.startsWith('@')) {\n              // 略过媒体查询，交给子节点继续插入 hashId\n              subInjectHash = true;\n            } else {\n              // 注入 hashId\n              mergedKey = injectSelectorHash(key, hashId, hashPriority);\n            }\n          } else if (root && !hashId && (mergedKey === '&' || mergedKey === '')) {\n            // In case of `{ '&': { a: { color: 'red' } } }` or `{ '': { a: { color: 'red' } } }` without hashId,\n            // we will get `&{a:{color:red;}}` or `{a:{color:red;}}` string for stylis to compile.\n            // But it does not conform to stylis syntax,\n            // and finally we will get `{color:red;}` as css, which is wrong.\n            // So we need to remove key in root, and treat child `{ a: { color: 'red' } }` as root.\n            mergedKey = '';\n            nextRoot = true;\n          }\n\n          var _parseStyle3 = parseStyle(value, _objectSpread(_objectSpread({}, config), {}, {\n            path: \"\".concat(path, \" -> \").concat(mergedKey)\n          }), {\n            root: nextRoot,\n            injectHash: subInjectHash\n          }),\n              _parseStyle4 = _slicedToArray(_parseStyle3, 2),\n              _parsedStr2 = _parseStyle4[0],\n              childEffectStyle = _parseStyle4[1];\n\n          effectStyle = _objectSpread(_objectSpread({}, effectStyle), childEffectStyle);\n          styleStr += \"\".concat(mergedKey).concat(_parsedStr2);\n        } else {\n          var _value;\n\n          var actualValue = (_value = value === null || value === void 0 ? void 0 : value.value) !== null && _value !== void 0 ? _value : value;\n\n          if (process.env.NODE_ENV !== 'production' && (_typeof(value) !== 'object' || !(value !== null && value !== void 0 && value[SKIP_CHECK]))) {\n            styleValidate(key, actualValue, {\n              path: path,\n              hashId: hashId\n            });\n          } // 如果是样式则直接插入\n\n\n          var styleName = key.replace(/[A-Z]/g, function (match) {\n            return \"-\".concat(match.toLowerCase());\n          }); // Auto suffix with px\n\n          var formatValue = actualValue;\n\n          if (!unitless[key] && typeof formatValue === 'number' && formatValue !== 0) {\n            formatValue = \"\".concat(formatValue, \"px\");\n          } // handle animationName & Keyframe value\n\n\n          if (key === 'animationName' && value !== null && value !== void 0 && value._keyframe) {\n            parseKeyframes(value);\n            formatValue = value.getName(hashId);\n          }\n\n          styleStr += \"\".concat(styleName, \":\").concat(formatValue, \";\");\n        }\n      });\n    }\n  });\n\n  if (!root) {\n    styleStr = \"{\".concat(styleStr, \"}\");\n  } else if (layer && supportLayer()) {\n    var layerCells = layer.split(',');\n    var layerName = layerCells[layerCells.length - 1].trim();\n    styleStr = \"@layer \".concat(layerName, \" {\").concat(styleStr, \"}\"); // Order of layer if needed\n\n    if (layerCells.length > 1) {\n      // zombieJ: stylis do not support layer order, so we need to handle it manually.\n      styleStr = \"@layer \".concat(layer, \"{%%%:%}\").concat(styleStr);\n    }\n  }\n\n  return [styleStr, effectStyle];\n}; // ============================================================================\n// ==                                Register                                ==\n// ============================================================================\n\nfunction uniqueHash(path, styleStr) {\n  return hash(\"\".concat(path.join('%')).concat(styleStr));\n}\n\nfunction Empty() {\n  return null;\n}\n/**\n * Register a style to the global style sheet.\n */\n\n\nexport default function useStyleRegister(info, styleFn) {\n  var token = info.token,\n      path = info.path,\n      hashId = info.hashId,\n      layer = info.layer;\n\n  var _React$useContext = React.useContext(StyleContext),\n      autoClear = _React$useContext.autoClear,\n      mock = _React$useContext.mock,\n      defaultCache = _React$useContext.defaultCache,\n      hashPriority = _React$useContext.hashPriority,\n      container = _React$useContext.container,\n      ssrInline = _React$useContext.ssrInline,\n      transformers = _React$useContext.transformers;\n\n  var tokenKey = token._tokenKey;\n  var fullPath = [tokenKey].concat(_toConsumableArray(path)); // Check if need insert style\n\n  var isMergedClientSide = isClientSide;\n\n  if (process.env.NODE_ENV !== 'production' && mock !== undefined) {\n    isMergedClientSide = mock === 'client';\n  }\n\n  var _useGlobalCache = useGlobalCache('style', fullPath, // Create cache if needed\n  function () {\n    var styleObj = styleFn();\n\n    var _parseStyle5 = parseStyle(styleObj, {\n      hashId: hashId,\n      hashPriority: hashPriority,\n      layer: layer,\n      path: path.join('-'),\n      transformers: transformers\n    }),\n        _parseStyle6 = _slicedToArray(_parseStyle5, 2),\n        parsedStyle = _parseStyle6[0],\n        effectStyle = _parseStyle6[1];\n\n    var styleStr = normalizeStyle(parsedStyle);\n    var styleId = uniqueHash(fullPath, styleStr); // Clear animation statistics\n\n    animationStatistics = {};\n\n    if (isMergedClientSide) {\n      var style = updateCSS(styleStr, styleId, {\n        mark: ATTR_MARK,\n        prepend: 'queue',\n        attachTo: container\n      });\n      style[CSS_IN_JS_INSTANCE] = CSS_IN_JS_INSTANCE_ID; // Used for `useCacheToken` to remove on batch when token removed\n\n      style.setAttribute(ATTR_TOKEN, tokenKey); // Dev usage to find which cache path made this easily\n\n      if (process.env.NODE_ENV !== 'production') {\n        style.setAttribute(ATTR_DEV_CACHE_PATH, fullPath.join('|'));\n      } // Inject client side effect style\n\n\n      Object.keys(effectStyle).forEach(function (effectKey) {\n        if (!globalEffectStyleKeys.has(effectKey)) {\n          globalEffectStyleKeys.add(effectKey); // Inject\n\n          updateCSS(normalizeStyle(effectStyle[effectKey]), \"_effect-\".concat(effectKey), {\n            mark: ATTR_MARK,\n            prepend: 'queue',\n            attachTo: container\n          });\n        }\n      });\n    }\n\n    return [styleStr, tokenKey, styleId];\n  }, // Remove cache if no need\n  function (_ref2, fromHMR) {\n    var _ref3 = _slicedToArray(_ref2, 3),\n        styleId = _ref3[2];\n\n    if ((fromHMR || autoClear) && isClientSide) {\n      removeCSS(styleId, {\n        mark: ATTR_MARK\n      });\n    }\n  }),\n      _useGlobalCache2 = _slicedToArray(_useGlobalCache, 3),\n      cachedStyleStr = _useGlobalCache2[0],\n      cachedTokenKey = _useGlobalCache2[1],\n      cachedStyleId = _useGlobalCache2[2];\n\n  return function (node) {\n    var styleNode;\n\n    if (!ssrInline || isMergedClientSide || !defaultCache) {\n      styleNode = /*#__PURE__*/React.createElement(Empty, null);\n    } else {\n      var _ref4;\n\n      styleNode = /*#__PURE__*/React.createElement(\"style\", _extends({}, (_ref4 = {}, _defineProperty(_ref4, ATTR_TOKEN, cachedTokenKey), _defineProperty(_ref4, ATTR_MARK, cachedStyleId), _ref4), {\n        dangerouslySetInnerHTML: {\n          __html: cachedStyleStr\n        }\n      }));\n    }\n\n    return /*#__PURE__*/React.createElement(React.Fragment, null, styleNode, node);\n  };\n} // ============================================================================\n// ==                                  SSR                                   ==\n// ============================================================================\n\nexport function extractStyle(cache) {\n  // prefix with `style` is used for `useStyleRegister` to cache style context\n  var styleKeys = Array.from(cache.cache.keys()).filter(function (key) {\n    return key.startsWith('style%');\n  }); // const tokenStyles: Record<string, string[]> = {};\n\n  var styleText = '';\n  styleKeys.forEach(function (key) {\n    var _ = _slicedToArray(cache.cache.get(key)[1], 3),\n        styleStr = _[0],\n        tokenKey = _[1],\n        styleId = _[2];\n\n    styleText += \"<style \".concat(ATTR_TOKEN, \"=\\\"\").concat(tokenKey, \"\\\" \").concat(ATTR_MARK, \"=\\\"\").concat(styleId, \"\\\">\").concat(styleStr, \"</style>\");\n  });\n  return styleText;\n}"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,eAAe,MAAM,2CAA2C;AACvE,OAAOC,aAAa,MAAM,0CAA0C;AACpE,OAAOC,cAAc,MAAM,0CAA0C;AACrE,OAAOC,kBAAkB,MAAM,8CAA8C;AAC7E,OAAOC,OAAO,MAAM,mCAAmC;AACvD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,EAAEC,SAAS,QAAQ,2BAA2B;AAChE,OAAOC,SAAS,MAAM,0BAA0B;AAChD,OAAOC,IAAI,MAAM,eAAe,CAAC,CAAC;;AAElC,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,SAASC,OAAO,EAAEC,SAAS,EAAEC,SAAS,QAAQ,QAAQ;AACtD,OAAOC,cAAc,MAAM,kBAAkB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